
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<title>网络公司-宠物</title>
<link rel="stylesheet" href="../res/layui/css/layui.css">
<link rel="stylesheet" href="../res/static/css/index.css">
</head>
<body>
	<!-- nav部分 -->
	<div id="head"></div>
	<!-- banner部分 -->
	<div class="banner news">
		<div class="title">
			<p>宠物信息</p>
			<p class="en">Real-time News</p>
		</div>
	</div>
	<!-- main -->
	<div class="main-news">
		<div class="layui-container">
			<div class="layui-row layui-col-space20"  id="box">


				
			</div>
			
		</div>
	</div>
	<!-- footer部分 -->
	<div id="footer"></div>
	<script src="../res/layui/layui.js"></script>
	<script src="../js/jquery-1.8.2.js"></script>
	<script>
		$("#head").load("页眉.html");
		$("#footer").load("页脚.html");
	</script>
	<script>
	
	$(function(){
		$.ajax({
			url : '../Cwxqservlet',
			type : "get",
			data : {
				
			},
			success : function(res) {
				var $box=$("#box");
					for(var i=0;i<res.data.length;i++){
						var p = res.data[i];
						if(p.jianjie.length>100){
							p.jianjie=p.jianjie.substr(0,100)+"。。。";
						}
						
						
						$box.append("<div class='layui-col-lg6 content'>"+
								"<div><div class='news-img'><a href='newsDetail.html?id="+p.id+"'><img src='../img/"+p.photo+"' width='100px'  heigth='100px' ></a></div>"+
								"<div class='news-panel'><strong><a href='newsDetail.html?id="+p.id+"'>"+p.name+"</a></strong>"+
								"<p class='detail'><span> </span><a href='newsDetail.html?id="+p.id+"'>"+p.jianjie+"</a></p>"+
										
								"</div></div></div>")
					}
			},

		});
		
	});
	
		
	</script>




	<!--[if lt IE 9]>
  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
	<script>
		layui.config({
			base : '../res/static/js/'
		}).use('firm');
	</script>

</body>
</html>